<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>进行中的拍卖</title>
{php echo register_jssdk();}
<meta content="app-id=518966501" name="apple-itunes-app">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<!-- {php echo register_jssdk(true);} -->
<link href="css/comm.css" rel="stylesheet" type="text/css">
<link href="css/goods.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/jquery190.js"></script>
<script language="javascript" src="js/touchslider.min.js"></script>
<script language="javascript" src="js/swipe.js"></script>
</head>
<body style="zoom: 1;">
    <div id="loadingPicBlock">
        <div class="wrapper">
            <style type="text/css">
                .box_swipe {overflow: hidden; position: relative;}
                .box_swipe ul {overflow: hidden; position: relative;margin:0;padding:0;}
                .box_swipe ul > li {float:left; width:100%; position: relative; text-align:center;}
                .box_swipe ul > li a{color:#FFF; text-decoration:none;}
                .box_swipe ul > li .title{position: absolute; bottom: 6px; display: block; padding:0 10px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; color:#FFF; z-index:100;}
                .box_swipe>ol{height:20px; position: relative; z-index:10; margin-top:-24px; text-align:right; padding-right:15px;}
                .box_swipe>ol>li{display:inline-block; margin-bottom:1px; width:8px; height:8px; background-color:#757575; border-radius: 8px;}
                .box_swipe>ol>li.on{background-color:#ffffff;}
            </style>
            <div id="banner_box" class="box_swipe" style='width:100%;'>
                <ul>
                    {loop $advs $adv}
                    <li>
                        <a href="{if empty($adv['link'])}#{else}{$adv['link']}{/if}">
                            <img src="{php echo tomedia($adv['thumb']);}" title="{$adv['advname']}" style='width:100%;height: 8rem;'/>
                        </a>
                    </li>
                    {/loop}
                </ul>
                <ol>
                   {php $slideNum = 1;}
                {loop $advs $adv}
                    <li{if $slideNum == 1} class="on"{/if}></li>
                    {php $slideNum++;}
                {/loop}
                </ol>
            </div>
            <script>
                $(function() {
                    new Swipe($('#banner_box')[0], {
                        speed:500,
                        auto:3000,
                        callback: function(){
                            var lis = $(this.element).next("ol").children();
                            lis.removeClass("on").eq(this.index).addClass("on");
                        }
                    });
                });
            </script>
            <div class="column" style="position: absolute;">
                <a href="javascript:;" title="进行中的拍卖" class="entry-list">进行中的拍卖<span></span><b class="fr"></b><cite id="biaoji"><em></em></cite></a>
                <div class="sort_list" id="sort_listnow" style="display: none;">
                    <ul>
                    	<li order="10"><a href="{php echo $this->createMobileUrl('index')}">所有进行中的拍卖<i></i></a></li>
                    	{loop $category $row}
                        <li order="10"><a href="{php echo $this->createMobileUrl('index')}&gid={$row['id']}">{$row['name']}<i></i></a></li>
						{/loop}
                    </ul>
                </div>
                <a href="javascript:;" title="已完成的拍卖" class="ann-publicly">已完成的拍卖<span></span><b class="fl"></b></a>
                <div class="sort_list" id="sort_listfin" style="display: none;">
                    <ul>
                    	<li order="10"><a href="{php echo $this->createMobileUrl('area')}">所有已完成的拍卖<i></i></a></li>
                    	{loop $category $row}
                        <li order="10"><a href="{php echo $this->createMobileUrl('area')}&gid={$row['id']}">{$row['name']}<i></i></a></li>
						{/loop}
                    </ul>
                </div>
            </div>
            <div class="goodList" style="position: relative;top: 38px;">
            {loop $list $row}
            <ul id="21960">
                <li><span class="gList_l fl" style=""><a href="{php echo $this->createMobileUrl('details',array('id' => $row['id']))}"><img src="{$_W['attachurl']}{$row['picarr']}" ></a></span>
                <div class="gList_r gList_r{$row['id']}"><a href="{php echo $this->createMobileUrl('details',array('id' => $row['id']))}"><h3 class="gray6" style="height: 1.2em;overflow-y:hidden;margin-bottom: 5px;">{$row['title']}</h3><em class="gray9"><p style="color:#999;position: relative;float:left;">起拍价：￥{$row['sh_price']}</p><p style="color:#999;position: relative;float:right;">保证金：￥{$row['bond']}</p></em><br/><em class="gray9"><p style="color:#FF0000;">当前价：￥{$row['st_price']}</p></em></a>
                <div class="gRate"><div class="Progress-bar"><p class="u-progress"><span style="width: {$row['bili']}%;" class="pgbar"><span class="pging"></span></span></p>
                <ul class="Pro-bar-li">
                    <li class="P-bar01"><em id="LeftTime{$row['id']}"></em>{if time() > $row['start_time']}时间剩余{else}即将开始{/if}</li>
                    <li class="P-bar03"><em>{$row['pos']}</em>出价次数</li>
                </ul></div>
                <a href="{php echo $this->createMobileUrl('exchange', array('id' => $row['id']))}" codeid="253706"><s></s></a></div></div></li>
            </ul>
            <script>
            $(document).ready(function(){
                    
                    $('.gList_r'+{$row['id']}).click(function(){
                        window.location.href='{php echo $this->createMobileUrl('details',array('id' => $row['id']))}';
                    });
                })
            function FreshTime()
            {
                var str ='{php echo date('Y-m-d H:i:s',$row['start_time'])}';
                str = str.replace(/-/g,"/");
                var starttime= new Date(str);//开始时间
                var strr ='{php echo date('Y-m-d H:i:s',$row['end_time'])}';
                strr = strr.replace(/-/g,"/");
                var endtime=new Date(strr);//结束时间
                var nowtime = new Date();//当前时间
                var now_time = parseInt(nowtime.getTime());
                var start_time = parseInt(starttime.getTime());
                if (now_time>start_time) {
                    var lefttime = parseInt((endtime.getTime()-nowtime.getTime())/1000);
                    if (lefttime > 0 ) {
                        d=parseInt(lefttime/3600/24);
                        h=parseInt((lefttime/3600)%24);
                        m=parseInt((lefttime/60)%60);
                        s=parseInt(lefttime%60);
                        document.getElementById("LeftTime"+{$row['id']}).innerHTML=d+"天"+h+"时"+m+"分"+s+"秒";
                    }else{
                        document.getElementById("LeftTime"+{$row['id']}).innerHTML="拍卖已结束";
                    }
                }
            }
            FreshTime()
            var sh;
            sh=setInterval(FreshTime,1000);
            </script>
            {/loop}
            {loop $listt $row}
            <ul id="21960">
                <li><span class="gList_l fl" style=""><a href="{php echo $this->createMobileUrl('details',array('id' => $row['id']))}"><img src="{$_W['attachurl']}{$row['picarr']}"></a></span>
                <div class="gList_r gList_r1"><a href="{php echo $this->createMobileUrl('details',array('id' => $row['id']))}"><h3 class="gray6" style="height:1.2em;overflow-y:hidden;margin-bottom: 5px;">{$row['title']}</h3><em class="gray9"><p style="color:#999;position: relative;float:left;">起拍价：￥{$row['sh_price']}</p><p style="color:#999;position: relative;float:right;">保证金：￥{$row['bond']}</p><br/><p><font color="#FF0000">当前价：￥{$row['st_price']}</font></p></em></a>
                <div class="gRate"><div class="Progress-bar"><p class="u-progress"><span style="width: {$row['bili']}%;" class="pgbar"><span class="pging"></span></span></p>
                <ul class="Pro-bar-li">
                    <li class="P-bar01"><em id="LeftTime{$row['id']}"></em>{if time() > $row['start_time']}时间剩余{else}即将开始{/if}</li>
                    <li class="P-bar03"><em>{$row['pos']}</em>出价次数</li>
                </ul></div>
                <a href="#" codeid="253706"><s></s></a></div></div></li>
            </ul>
            <script>
            function FreshTime()
            {
                var str ='{php echo date('Y-m-d H:i:s',$row['start_time'])}';
                str = str.replace(/-/g,"/");
                var starttime= new Date(str);//开始时间
                var strr ='{php echo date('Y-m-d H:i:s',$row['end_time'])}';
                strr = strr.replace(/-/g,"/");
                var endtime=new Date(strr);//结束时间
                var nowtime = new Date();//当前时间
                var now_time = parseInt(nowtime.getTime());
                var start_time = parseInt(starttime.getTime());

                var lefttime = parseInt((start_time-nowtime.getTime())/1000);
                if (lefttime > 0) {
                    dd=parseInt(lefttime/3600/24);
                    hh=parseInt((lefttime/3600)%24);
                    mm=parseInt((lefttime/60)%60);
                    ss=parseInt(lefttime%60);
                    document.getElementById("LeftTime"+{$row['id']}).innerHTML=dd+"天"+hh+"时"+mm+"分"+ss+"秒";
                }else{
                    document.getElementById("LeftTime"+{$row['id']}).innerHTML="拍卖已开始";
                }     
            }
            FreshTime()
            var sh;
            sh=setInterval(FreshTime,1000);
            </script>
            {/loop}
            {if empty($list) && empty($listt)}
            <div class="noRecords gray9"><s></s>暂无记录</div>
            {/if}
                <div id="divGoodsLoading" class="loading" style="height: 0px;"><!-- <b></b>正在加载 --></div>
            </div>
            <div class="load_more" id="btnLoadMore" style="display: none;"><aside class="more"><a href="javascript:void(0);" onclick="getMoreRecru(2)">查看更多</a></div>
        </div>
        <div style="height: 60px;"></div>
    </div>
    <div class="footer" style="bottom: 0px;height: 50px;">
        <ul>
            <li class="f_home"><a href="{php echo $this->createMobileUrl('index')}" class="hover" title="首页"><i class="icon iconfont">&#xe61c;</i>首页</a></li>
            <li class="f_whole"><a href="{php echo $this->createMobileUrl('introduction')}" title="拍卖介绍"><i class="icon iconfont">&#xe627;</i>拍卖介绍</a></li>
            <li class="f_personal"><a href="{php echo $this->createMobileUrl('profile')}" title="个人中心"><i class="icon iconfont">&#xe61e;</i>个人中心</a></li>
        </ul>
    </div>
</body>
<script type="text/javascript">
function getMoreRecru(page){
    var ajxurl="{php echo $this->createMobileUrl('Ajaxgetzwlist').'&pages='}"+page;
     $.ajax({
        type:"GET",
        url:ajxurl,
        dataType:'json',
        beforeSend:function(XMLHttpRequest){ 
            $('.more').html('<img src="../images/loading.gif" />');
        },
        success:function(data){
            if (data.success){
                if (data.list.length > 0){
                    for (var i in data.list){
                        var info = data.list[i];
                        $('#container').append('<a  class="block arr"  href="{php echo $this->createMobileUrl('showdetail')}&id='+info.id+'"><img  src="images/'+info.zptype+'.png"><dl  class="fix"><dt><span class="ongoing">'+info.residedist+'</span>'+info.title+'</dt><dd><span class="location">'+info.pubdate+'</span><span class="date">浏览量：'+info.hitnumber+'</span></dd></dl></a>'
                            );
                    };
                    page+= 1;
                    $('.more').html('<a href="javascript:void(0);" onclick="getMoreRecru('+page+');">查看更多</a>');
                }
                else{
                   $('.more').html('没有更多内容了...');
                }
            }
            else{
                alert('加载失败, 当前网络不给力?');
                $('.more').html('<a href="javascript:void(0);" onclick="getMoreRecru('+page+');">再次尝试加载</a>');
            }
        }
     });
}
$('.entry-list').click(function(){
    $('.goodList').hide();
    $('#sort_listfin').hide();
    $('#biaoji').remove();
    $('.entry-list .fr').after("<cite id='biaoji'><em></em></cite>");
    $('#sort_listnow').show();
});
$('.ann-publicly').click(function(){
    $('.goodList').hide();
    $('#sort_listnow').hide();
    $('#biaoji').remove();
    $('.ann-publicly .fl').after("<cite id='biaoji'><em></em></cite>");
    $('#sort_listfin').show();
});
wx.ready(function (){
	var shareData = {
		title: "{$share_data['share_title']}",
		desc: "{$share_data['share_desc']}",
		link: "{$to_url}",
		imgUrl: "{$_W['attachurl']}{$share_data['share_image']}",
	};
//分享朋友
	wx.onMenuShareAppMessage({
	    title: shareData.title,
	  	desc: shareData.desc,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
//朋友圈
	wx.onMenuShareTimeline({
	  	title: shareData.title+"---"+shareData.desc,
	  	link: shareData.link,
	  	imgUrl:shareData.imgUrl,
	  	trigger: function (res) {
	  	},
	  	success: function (res) {
	    	window.location.href =adurl;
	  	},
	  	cancel: function (res) {
	  	},
	  	fail: function (res) {
	    	alert(JSON.stringify(res));
	  	}
	});
});
</script>
</html>
